feat(provider):增加自定义chat端口功能#367
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
|
@xgopilot 先确认当前总体方案设计,再确认有没有存在风险点(诸如方案设计、模块边界等等) |
@xgopilot 给我修复第一个和第三个问题,第三个问题你只能以脚本/命令方式解决 |
处理结果已按你的要求只修复第 1、3 个问题,并已推送到当前 PR 分支。 变更说明
使用命令go run ./scripts/migrate_provider_yaml.go --base-dir ~/.neocode仅预览: go run ./scripts/migrate_provider_yaml.go --base-dir ~/.neocode --dry-run验证
提交与推送
未处理项:第 2 个问题(按你的指示本次不处理)。 |
… migration script Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
fix: unify compact asset injection and add provider yaml migration script
|
@xgopilot 给我一个能给AI用来review的提示词,先确认当前总体方案设计,再确认有没有存在风险点(诸如方案设计、模块边界等等) |
|
@xgopilot 你是资深 Go 架构评审。请只做评审,不做代码修改。 评审对象:当前 PR(base=origin/main, compare=origin/main...HEAD) 请按以下顺序输出:
附加约束:
|
@xgopilot 修复第二个、第三个、第四个问题 |
|
已按你的要求修复第 2、3、4 项,并已提交推送到当前 PR 分支 变更摘要
测试
提交信息
|
- make ResolvedProviderConfig.ToRuntimeConfig return error and wire explicit handling through runtime/app/config-state paths - add tests for ToRuntimeConfig error path and runtime asset zero fallback semantics - document runtime.max_repeat_cycle_streak and runtime.assets fields with zero-value behavior Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
|
/code 提高测试覆盖率 |
处理结果已完成“提高测试覆盖率”的补测,并推送到当前 PR 分支。 本次补测
验证
提交与推送
未执行项:未修改功能逻辑,仅做测试覆盖增强。 |
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
test: improve coverage for provider defaults and migration script
|
/review |
| cfg.DiscoveryEndpointPath = discoveryEndpointPath | ||
| if modelSource == provider.ModelSourceManual { | ||
| cfg.Models = toCustomProviderModelFiles(normalizedModels) | ||
| cfg.Models = toCustomProviderModelFiles(input.Models) |
There was a problem hiding this comment.
[Medium] SaveCustomProviderWithModels can persist manual models with empty name (validation was removed), but the loader path still rejects empty models[].name. This creates a write/read contract mismatch: save succeeds, then next load fails on the generated file. Please either reintroduce name validation before writing or make load semantics consistent with save semantics.
| @@ -171,6 +178,17 @@ models: | |||
| - 老配置未声明 `model_source` 时,默认按 `discover` 处理。 | |||
| - `manual` 模式下必须提供 `models`,否则会在加载/创建阶段报错。 | |||
| - `manual` 模式会忽略 discovery 相关字段(如 `discovery_endpoint_path`、`discovery_response_profile`)。 | |||
There was a problem hiding this comment.
[Low] This bullet still mentions discovery_response_profile, but that field was removed from the custom provider schema in this PR. Please update the sentence to only reference currently supported discovery fields to avoid operator confusion.
|
/code 修复最近两条review的问题 |
修复结果已按“最近两条 review”完成修复并推送到当前 PR 分支。
验证
提交与推送
未执行项:无。 |
目的
具体修改范围
收益是什么
额外标注
这是一次配置模型收敛,旧版 provider.yaml 的嵌套字段写法(如 openai_compatible/gemini/anthropic 块)在严格校验下会被拒绝,需要迁移。